<button nz-button [nzType]="'primary'" (click)="showModal()" class="btn-add" ><i class="fas fa-plus"></i>
  新增
</button>
<nz-modal nzMaskClosable="false" [(nzVisible)]="isVisible" nzTitle="新增活动项目" (nzOnCancel)="handleCancel()" (nzOnOk)="handleOk()">
  <nzi-form [formName]="validateForm" #resetFormComponent>
    <form nz-form [formGroup]="validateForm" (ngSubmit)="submitForm()">
      <nz-form-item>
          <nz-form-label>申请人<span class="required-icon">*</span></nz-form-label>
          <nz-form-control>
            <input nz-input formControlName="applicant">
            <nz-form-explain *ngIf="getInvalid('applicant')">
              {{getInvalid('applicant').message}}
            </nz-form-explain>
          </nz-form-control>
      </nz-form-item>
      <nz-form-item>
          <nz-form-label>活动项目<span class="required-icon">*</span></nz-form-label>
          <nz-form-control>
            <nz-select nzShowSearch (ngModelChange)='onSearch($event)' [nzPlaceHolder]="'请选择活动项目'" formControlName="apmId">
              <nz-option  *ngFor="let tourism of tourisms" [nzLabel]='tourism.activeName' [nzValue]='tourism.id'>{{tourism.activeName}}</nz-option>
            </nz-select>
            <nz-form-explain *ngIf="getInvalid('apmId')">
              {{getInvalid('apmId').message}}
            </nz-form-explain>
          </nz-form-control>
      </nz-form-item>
      <nz-form-item>
          <nz-form-label>总人数<span class="required-icon">*</span></nz-form-label>
          <nz-form-control>
            <input nz-input type="number" (ngModelChange)='nzBlur($event)' onkeyup="if(this.value.length==1){this.value=this.value.replace(/[^1-9]/g,'')}else{this.value=this.value.replace(/\D/g,'')}" onafterpaste="if(this.value.length==1){this.value=this.value.replace(/[^1-9]/g,'')}else{this.value=this.value.replace(/\D/g,'')}" formControlName="numbers">
            <nz-form-explain *ngIf="getInvalid('numbers')">
              {{getInvalid('numbers').message}}
            </nz-form-explain>
          </nz-form-control>
      </nz-form-item>
      <nz-form-item>
          <nz-form-label>总费用<span class="required-icon">*</span></nz-form-label>
          <nz-form-control>
            <input nz-input [(ngModel)]="grossPrice" disabled formControlName="grossPrice">
            <nz-form-explain *ngIf="getInvalid('grossPrice')">
              {{getInvalid('grossPrice').message}}
            </nz-form-explain>
          </nz-form-control>
      </nz-form-item>
    </form>
  </nzi-form>
</nz-modal>
